#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QGridLayout* layout = new QGridLayout(this);

    QPushButton* button1 = new QPushButton("button1");
    QPushButton* button2 = new QPushButton("button2");
    QPushButton* button3 = new QPushButton("button3");
    QPushButton* button4 = new QPushButton("button4");
    QPushButton* button5 = new QPushButton("button5");
    QPushButton* button6 = new QPushButton("button6");
    QPushButton* button7 = new QPushButton("button7");

    layout->addWidget(button1,0,0);
    layout->addWidget(button2,0,1);
    layout->addWidget(button3,0,2);
    layout->addWidget(button4,1,0);
    layout->addWidget(button5,1,1);
    layout->addWidget(button6,1,2);
    layout->addWidget(button7,2,0);
    this->setLayout(layout);

    layout->setColumnStretch(0,1);
    layout->setColumnStretch(1,2);
    layout->setColumnStretch(2,0);

}

Widget::~Widget()
{
    delete ui;
}

